of

public static ClientCertificate of(X509Certificate x509Cert, SslPrivateKey privateKey)

Returns the ClientCertificate instance for the given certificate and SSL private key.

Parameters

x509Cert

an X.509 certificate

privateKey

an SSL (EC or RSA) private key

Throws

when certificate encoding fails


public static ClientCertificate of(X509Certificate x509Cert, SslPrivateKey privateKey, List<X509Certificate> intermediateX509Certs)

Returns the ClientCertificate instance for the given certificate, SSL private key, and intermediate certificates.

Since

7.24.5

Parameters

x509Cert

an X.509 certificate

privateKey

an SSL (EC or RSA) private key

intermediateX509Certs

a list of intermediate certificates for chain building. Can be empty.

Throws

when certificate encoding fails


public static ClientCertificate of(Path keystoreFilePath, String keystorePassword, KeyStoreType keyStoreType)

Loads a client certificate from the given keystore file with the given password and keystore type. The first (end-entity) certificate, all intermediate certificates, and private key will be taken from the given keystore.

Parameters

keystoreFilePath

the path to a valid keystore file

keystorePassword

the password used to access the keystore

keyStoreType

the keystore type

Throws

when the client certificate loading has been failed